/*
 * @name: **列表
 * @content: 
 * @Author: joyce
 * @Date: 2020-05-23 10:24:20
 */ 
var mongoose = require("mongoose");

//推荐表(recommend)

var recommendSchema = new mongoose.Schema({
  recommendtype:{type:String,required: true},//推荐类型 珠海港圈 创新建议 互帮互助 工作投票 问卷调查 资源共享
  articleid:{ type: mongoose.SchemaTypes.ObjectId, ref: "article" },//文章id 珠海港圈/创新建议
  problemid:{ type: mongoose.SchemaTypes.ObjectId, ref: "problem" },//问题id 互帮互助
  voteid:{ type: mongoose.SchemaTypes.ObjectId, ref: "vote" },//投票id
  questionid:{ type: mongoose.SchemaTypes.ObjectId, ref: "question" },// 问卷id
  resourceid:{ type: mongoose.SchemaTypes.ObjectId, ref: "resource" },// 资源共享id
  Adshow:{type: Boolean, default:true},//推荐状态  true上架 false下架
  create_time:{type: Date, default: new Date()}//创建时间

});

module.exports = mongoose.model("recommend", recommendSchema);